﻿using Domain.Entities;
using MAF.CRUD;
using MAF.UserSecurity;

namespace Business
{
    public class BusinessFactory
    {
        public static ICRUD<CategoryInfo> CreateCategory(string module)
        {
            return new CategorySafe(new CategorySvc(module));
        }

        public static ICRUD<Content> CreateArticle(string module)
        {
            return new ArticleSafe(new ArticleSvc(module));
        }

        public static ICRUD<ProductInfo> CreateProduct(string module)
        {
            return new ProductSafe( new ProductSvc(module) );
        }

        public static ICRUD<MessageInfo> CreateMessage(string module)
        {
            return new MessageSafe( new MessageSvc(module) );
        }

        public static ICRUD<DealerInfo> CreateDealer(string module)
        {
            return new DealerSafe( new DealerSvc(module) );
        }

        //public static ICRUD<User> CreateUser(string module)
        //{
        //    //return new UserSafe( new UserSvc(module) );
        //    return MAF.Authentication.Business.BizFactory.CreateUser(module);
        //}
    }
}
